package store.lunangangster.bpmn.converter;

import javax.xml.stream.XMLStreamReader;
import store.lunangangster.bpmn.model.BpmnModel;
import store.lunangangster.bpmn.model.Task;
import store.lunangangster.bpmn.util.BpmnXmlUtil;

public class TaskConverter extends ActivityConverter {

  public TaskConverter() {
    super();
  }

  @Override
  protected Task convertToElement(XMLStreamReader xsr, BpmnModel model) throws Exception {
    Task task = null;

    task = new Task();

    BpmnXmlUtil.addXmlLocation(xsr, task);

    this.parseChildElement(xsr, task, this.getTargetName(), model);
    return task;
  }

  @Override
  public String getTargetName() {
    return ELEMENT_TASK_NONE;
  }
}
